package com.example.administrator.yuejian_2.interservice;

import com.example.administrator.yuejian_2.bean.CommentAddBean;
import com.example.administrator.yuejian_2.bean.CommentListBean;
import com.example.administrator.yuejian_2.bean.PostAddBean;
import com.example.administrator.yuejian_2.bean.PostDetailBean;
import com.example.administrator.yuejian_2.bean.PostListBean;

import java.util.List;

import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by Administrator on 2017/10/12.
 */

public interface PostService {
    @POST("shaitu/shaitulist")
    Call<List<PostListBean>> shaitulist();

    @POST("shaitu/shaitudetail")
    Call<PostDetailBean> shaitudetail(@Query("pic_id") int pic_id);

    @POST("shaitu/getcomment")
    Call<List<CommentListBean>> getcomment(@Query("pic_id") int pic_id);

    @POST("shaitu/commentadd")
    Call<CommentAddBean> commentadd(@Query("pic_id") int pic_id,
                                    @Query("user_id") int uid,
                                    @Query("content") String con);


    @Multipart
    @POST("Shaitu/ShaituAdd")
    Call<PostAddBean> ShaituAdd(@Query("user_id") int uid,
                                @Query("title") String title,
                                @Part MultipartBody.Part file);


}
